package com.fcat.springboot.mqtt.emqx;

public class MqttUtil {
    public static String getDeviceCodeByTopic(String topic){
        int index=topic.lastIndexOf('/');
        String getDeviceCodeByTopic="";
        if(index !=-1){
            getDeviceCodeByTopic=topic.substring(index+1);
        }
        return getDeviceCodeByTopic;
    }
}
